<!-- 文件：components/user-card.vue -->
<template>
  <view class="user-card">
    <image class="avatar" :src="user.photos[0]"></image>
    <view class="info">
      <view class="name">{{ user.name }}<text class="age">, {{ user.age }}</text></view>
      <view class="distance">{{ user.distance }}</view>
      <view class="tags">
        <text v-for="(tag, i) in user.tags" :key="i">{{ tag }}</text>
      </view>
    </view>
    <view class="actions">
      <button @click="$emit('like', user)">❤️ 喜欢</button>
      <button @click="$emit('chat', user)">💬 聊天</button>
    </view>
  </view>
</template>